#include <dspSimulator/register/controlRegister.h>
#include <utility>

CReg::CReg(std::string name, u32 mask) {
    m_name = std::move(name);
    m_mask = mask;
    m_data = 0;
}

u32 *CReg::getDataPtr() {
    m_data &= m_mask;
    return Register::getDataPtr();
}

void CReg::updateData(u32 data) {
    data &= m_mask;
    Register::updateData(data);
}
